Generally, liquid crystal cells in the prior art are incompatible with 2D and 3D displays. Grating arrays for integral imaging are normally physically-structured convex lens arrays. Liquid crystal cells for 3D images will generate blurred images with degraded resolution when used for displaying 2D images. Moreover, methods for producing liquid crystal cells are generally complex and inconvenient to operate.